package com.situ.yB2C.user.service;

import java.util.List;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;

import org.springframework.web.multipart.MultipartFile;

import com.situ.yB2C.user.pojo.User;

public interface UserService {

	int saveUser1(User user);
	int saveUser(User user, MultipartFile userFile ,String realPath);
	
	List<User> findAllUser();
	
	User findUserById(Long rowId);
	
	
	int updateUser(User user);
	
	
	int deleteUser(Long rowId);
	
	int doDeleteUserById(Long rowId);
	
	/**
	 * 
	 * @param userCode
	 * @param userPass
	 * @param session
	 * @return  0: 1: .: 3:
	 */
	int doUserLogin(String userCode , String userPass,HttpSession session);
	
	int doBuyerLogin(String userCode, String userPass,Integer remember, HttpServletRequest request ,HttpServletResponse response);
	
	int doAdminLogin(String userCode, String userPass,HttpServletRequest request );
	
	void autoBuyerLogin(HttpServletRequest request);
	
	void initUserData();
	
	int checkUserCode(String userCode);
}
